package com.loves.admin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

@TableName(value = "pms_peoduct_sku")
public class ProductSku {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    private String productId;

    private Integer code;

    private Integer price;

    private Integer stock;

    private Integer lowStock;

    private String pic;

    private Integer sale;

    private String spData;

    private LocalDateTime createDate;

    private String createName;

    private LocalDateTime modifyDate;

    private String modifyName;

    private Boolean deleteFlag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public Integer getLowStock() {
        return lowStock;
    }

    public void setLowStock(Integer lowStock) {
        this.lowStock = lowStock;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public Integer getSale() {
        return sale;
    }

    public void setSale(Integer sale) {
        this.sale = sale;
    }

    public String getSpData() {
        return spData;
    }

    public void setSpData(String spData) {
        this.spData = spData;
    }

    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public LocalDateTime getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(LocalDateTime modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getModifyName() {
        return modifyName;
    }

    public void setModifyName(String modifyName) {
        this.modifyName = modifyName;
    }

    public Boolean getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Boolean deleteFlag) {
        this.deleteFlag = deleteFlag;
    }


    public static final class Builder {
        private String id;
        private String productId;
        private Integer code;
        private Integer price;
        private Integer stock;
        private Integer lowStock;
        private String pic;
        private Integer sale;
        private String spData;
        private LocalDateTime createDate;
        private String createName;
        private LocalDateTime modifyDate;
        private String modifyName;
        private Boolean deleteFlag;

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder productId(String productId) {
            this.productId = productId;
            return this;
        }

        public Builder code(Integer code) {
            this.code = code;
            return this;
        }

        public Builder price(Integer price) {
            this.price = price;
            return this;
        }

        public Builder stock(Integer stock) {
            this.stock = stock;
            return this;
        }

        public Builder lowStock(Integer lowStock) {
            this.lowStock = lowStock;
            return this;
        }

        public Builder pic(String pic) {
            this.pic = pic;
            return this;
        }

        public Builder sale(Integer sale) {
            this.sale = sale;
            return this;
        }

        public Builder spData(String spData) {
            this.spData = spData;
            return this;
        }

        public Builder createDate(LocalDateTime createDate) {
            this.createDate = createDate;
            return this;
        }

        public Builder createName(String createName) {
            this.createName = createName;
            return this;
        }

        public Builder modifyDate(LocalDateTime modifyDate) {
            this.modifyDate = modifyDate;
            return this;
        }

        public Builder modifyName(String modifyName) {
            this.modifyName = modifyName;
            return this;
        }

        public Builder deleteFlag(Boolean deleteFlag) {
            this.deleteFlag = deleteFlag;
            return this;
        }

        public ProductSku build() {
            ProductSku productSku = new ProductSku();
            productSku.setId(id);
            productSku.setProductId(productId);
            productSku.setCode(code);
            productSku.setPrice(price);
            productSku.setStock(stock);
            productSku.setLowStock(lowStock);
            productSku.setPic(pic);
            productSku.setSale(sale);
            productSku.setSpData(spData);
            productSku.setCreateDate(createDate);
            productSku.setCreateName(createName);
            productSku.setModifyDate(modifyDate);
            productSku.setModifyName(modifyName);
            productSku.setDeleteFlag(deleteFlag);
            return productSku;
        }
    }
}
